import request from '@/utils/request'

// 查询销假申请列表
export function listCancellation(query) {
  return request({
    url: '/attendance/cancellation/list',
    method: 'get',
    params: query
  })
}

// 查询销假申请详细
export function getCancellation(cancellationRequestId) {
  return request({
    url: '/attendance/cancellation/' + cancellationRequestId,
    method: 'get'
  })
}

// 新增销假申请
export function addCancellation(data) {
  return request({
    url: '/attendance/cancellation',
    method: 'post',
    data: data
  })
}

// 修改销假申请
export function updateCancellation(data) {
  return request({
    url: '/attendance/cancellation',
    method: 'put',
    data: data
  })
}

// 删除销假申请
export function delCancellation(cancellationRequestId) {
  return request({
    url: '/attendance/cancellation/' + cancellationRequestId,
    method: 'delete'
  })
}
